<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/connopen.asp"-->
<!--#include file="lib/asp-common-lib.asp"-->
<!--#include file="lib/dict_col.asp"-->
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户关系管理及报关单统计系统</title><!--#include file="lib/plugins.asp"-->
<style type="text/css">
	.ui-datepicker table {
		border: 0;
	}
	thead th{
		text-align:center;
		background:#e0e0e0;
	}
	tbody th[scope="row"],tbody th.sub{
		text-align:center;
	}
	input,select{
		border:1px solid #888888;
	}
	input:hover,input:active,select:hover,select:active{
		border:1px solid #aa6666
	}
	input[type=text]{
		padding:2px;
		margin:1px 0;
	}
	#pagebar{
		float:right;
	}
	#search_bar{
		border-width:1px 0;
	}
	#search_bar td{
		padding:1px;
		border-width:0;
	}
	#search_bar tr:hover td{
		background:#fff;
	}
	.bt_button{
    cursor: pointer;
    overflow: visible;
    width: auto;
    background: url("lib/yaml/screen/images/button_gray.png") repeat-x scroll left top #454545;
    border-color: #DDDDDD #444444 #444444 #DDDDDD;
    border-style: solid;
    border-width: 1px;
    color: #000000;
    padding: 5px 1em;	
	}
	.bt_button:hover,.bt_button:active,.bt_button:focus{
    background: none repeat-x scroll left top #555555;
    border-color: #444444 #DDDDDD #DDDDDD #444444;
    color: #ffffff;
	}
	#page_go,#print_search,.bt_act{
		padding:0;
	}
	.chk{
		background-color:#d0d0d0;
	}
	#diaglog_print{
		display:none;
	}
	#lb_search{
		width:5em;
	}
	#bts_search{
		width:9.6em;
		text-align:right;
	}
	#adv_search{
		display:none;
	}
</style>
<script type="text/javascript">
	$(function() {
		$(".datepicker").datepicker();
/*
		var json_company;
		var json_country;
		var json_rpt;
		function Init_Country(){
			var country_option="";
			$.each(json_country,function(i,item){
				country_option+='<option value="'+i+'">'+item+'</option>';
			});
			$("#country").append(country_option);
		}
		function Get_Country(countryid){
			return json_country[countryid];
		}
		function Init_Company(){
			var company_option="";
			$.each(json_company,function(i,item){
				company_option+='<option value="'+i+'">'+item+'</option>';
			});
			$("#company").append(company_option);
		}
		function Get_Company(companyid){
			return json_company[companyid];
		}
		function Init_Rpt(rownum){
			var rpt_tr="<tbody>";
			for(var i=0;i<rownum;i++){
				rpt_tr+="<tr><td>"+(i+1)+"</td><td>"+Get_Country(json_rpt[i][0])+"</td><td>"+json_rpt[i][1]+"</td><td>"+json_rpt[i][2]+"</td><td>"+json_rpt[i][3]+"</td></tr>";
			}
			rpt_tr+="</tbody>";
			$("#rpt").append(rpt_tr);
		}
		
		$.getJSON("json_rpt.asp",{ymid:$("#ymid").val()},function(data){
			json_company=data.company;
			json_country=data.country;
			json_rpt=data.rpt;
			Init_Country();
			Init_Company();
			Init_Rpt(25);
		});
*/
		var p=1;
		function vi(p){
			$.get("rptbrowse_main.asp?page="+p+"&"+$("#fm_search").serialize(),function(data){	//用ajax的get方式提交
				$("#rptbrowse_main").html(data);

				$("#pagebar a").click(function(e){	//对分页栏中的a元素进行操作
					e.preventDefault();	//阻止a的原先事件
					vi($(this).attr("id"));	//根据获取的页码值调用显示页面函数
				});
				$("#page_go").click(function(e){	//对分页栏中的input元素进行操作
					e.preventDefault();
					if (isNaN($("#page_val").val())||$.trim($("#page_val").val())==""){	//判断输入的是否是数字
						alert("输入的页码错误，请输入正确页码！");
						$("#page_val").select();
						return false;	//页码值不是数字则退出；
					}
					vi($("#page_val").val());
				});
				
			});

		}
		
		var start_time = new Date().getTime();
		vi(p);
		var end_time = new Date().getTime();
		$("#show_runtime").html(end_time-start_time);
		$("#search_bar select").change(function(){
			//console.log($(this).get(0).selectedIndex);
			if($(this).get(0).selectedIndex==0){
				$(this).css('color','black');
			}else{
				$(this).css('color','red');
			}
		});
		$("#search_bar input[type=reset]").click(function(){
			$("#search_bar select").css('color','black');
		});
		
	});
</script>	
<!--#include file="lib/js-google-analytics.asp"-->
</head>
<%
	' if not CheckFlag(session("aaPostflag"),1) then call JumpErrorPage(2)
	ymid=saferequest("id",1)
	countryid=saferequest("countryid",0)
	companyid=saferequest("companyid",0)
%>
<body>
<!--#include file="lib/header.asp"-->
<!--#include file="lib/nav.asp"-->
<div id="main">

<!--#include file="lib/col1.asp"-->
<!--#include file="lib/col2.asp"-->
	<div id="col3" role="main">
		<div id="col3_content" class="clearfix">
			<form id="fm_search" name="fm_search">
				<input id="ymid" type="hidden" value="<%=ymid%>" name="ymid" />
				<input id="countryid" type="hidden" value="<%=countryid%>" name="countryid" />
				<input id="companyid" type="hidden" value="<%=companyid%>" name="companyid" />
			</form>
			<div id="rptbrowse_main"></div>
		</div>
	</div>
</div>
<!--#include file="lib/footer.asp"-->
</body>
</html>
<!--#include file="lib/connclose.asp"-->

